<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2021/9/14
  Time: 10:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path = request.getContextPath();%>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript">
        $(function (){
            CKEDITOR.replace("content");
        })
        $(function (){
            $('#testfile').fileinput({
                language: 'zh',
                uploadUrl: '<%=path%>/file/upLoadFile',
                showCaption: true,
                showUpload: true,
                showRemove: true,
                showClose: true,
                minFileSize:20,
                maxFileCount:3,
                enctype:"multiple-form/data",
                browseClass: 'btn btn-primary'
            });
            $('#testfile').on('fileuploaded',function (event,data,previewId,index){
                //data 有很多数据 例如 imgUrl就在里面保存
                var dataUrl = $("#imgUrl").val();
                var url=  dataUrl+','+data.response.imgUrl;
                $("#imgUrl").val(url.substring(1));

            })
        })

    </script>
</head>
<body>
<form id="tabRoute_add_form">
    <div class="form-group">
        <label for="rname">路线名称:</label>
        <input type="text" class="form-control" name="rname" id="rname" placeholder="请输入路线名称">
    </div>
    <div class="form-group">
        <label for="price">价格:</label>
        <input type="text" class="form-control" name="price" id="price" placeholder="请输入价格">
    </div>
    <div class="form-group">
        <label for="content">路线介绍:</label>
        <textarea class="form-control" name="routeintroduce" id="content" placeholder="请输入路线介绍"></textarea>
    </div>
    <div class="form-group">
        <label for="rflag">flag:</label>
        <input type="text" class="form-control" name="rflag" id="rflag" placeholder="请输入flag">
    </div>
    <div class="form-group">
        <label for="date">旅游日期:</label>
        <input type="date" class="form-control" name="rdate" id="date" placeholder="请输入日期">
    </div>
    <div class="form-group">
        <label for="isthemetour">旅游主题:</label>
        <input type="text" class="form-control" name="isthemetour" id="isthemetour" placeholder="请输入旅游主题">
    </div>
    <div class="form-group">
        <label for="count">统计:</label>
        <input type="text" class="form-control" name="count" id="count" placeholder="统计次数">
    </div>
    <div class="form-group">
        <label for="CID">CID:</label>
        <input type="text" class="form-control" name="cid" id="CID" placeholder="请输入路线分类表ID">
    </div>
    <div class="form-group">
        <label for="testfile">景点图片:</label>
        <input id="imgUrl" type="text" name="rimage">
        <input type="file" class="form-control" name="myFile" id="testfile" placeholder="添加图片">
    </div>
    <div class="form-group">
        <label for="sid">商家ID:</label>
        <input type="text" class="form-control" name="sid" id="sid" placeholder="请输入商家ID">
    </div>
    <div class="form-group">
        <label for="support">资源ID:</label>
        <input type="text" class="form-control" name="sourcdid" id="support"  placeholder="请输入资源ID">
    </div>
</form>
</body>
</html>
